using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace BaseData.Models.Mapping
{
    public class V1_Web_Base_Accounts_Ext_BaseMap : EntityTypeConfiguration<V1_Web_Base_Accounts_Ext_Base>
    {
        public V1_Web_Base_Accounts_Ext_BaseMap()
        {
            // Primary Key
            this.HasKey(t => new { t.PkId, t.AccId, t.AccIdType });

            // Properties
            this.Property(t => t.PkId)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            this.Property(t => t.AccId)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.AccIdType)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            // Table & Column Mappings
            this.ToTable("V1_Web_Base_Accounts_Ext_Base");
            this.Property(t => t.PkId).HasColumnName("PkId");
            this.Property(t => t.AccId).HasColumnName("AccId");
            this.Property(t => t.AccIdType).HasColumnName("AccIdType");
            this.Property(t => t.NameTrue).HasColumnName("NameTrue");
            this.Property(t => t.NameFull).HasColumnName("NameFull");
            this.Property(t => t.NameAs).HasColumnName("NameAs");
            this.Property(t => t.Sex).HasColumnName("Sex");
            this.Property(t => t.Birth).HasColumnName("Birth");
            this.Property(t => t.Mobile).HasColumnName("Mobile");
            this.Property(t => t.Mail).HasColumnName("Mail");
            this.Property(t => t.QQ).HasColumnName("QQ");
            this.Property(t => t.Memo).HasColumnName("Memo");
            this.Property(t => t.Message).HasColumnName("Message");
            this.Property(t => t.FundPostFDT).HasColumnName("FundPostFDT");
            this.Property(t => t.FundPostLDT).HasColumnName("FundPostLDT");
            this.Property(t => t.flagActive).HasColumnName("flagActive");
            this.Property(t => t.flagType).HasColumnName("flagType");
            this.Property(t => t.flagLevel).HasColumnName("flagLevel");
            this.Property(t => t.flagStatus).HasColumnName("flagStatus");
        }
    }
}
